/*Search str1 in str2*/

#include <stdio.h>
#include <string.h>

int main ( int argc, char const *argv[] ) {
    char str1[10000];
    char str2[10000];
    char tmps[10000];
    int i = 0, j = 0, tmp = 0, find = 0;
    gets(str1);
    gets(str2);
    
    for ( i = 0; i < strlen(str2); i++ ) {
        tmp = i;
        for ( j = 0; j < strlen(str1); j++ ) { 
            tmps[j] = str2[tmp];
            tmp++;
        }
        tmps[j+1] = '\0';

        if ( !strcmp(str1,tmps) ) {
            printf("%d ",i);
            find = 1;
        }

    }

    if ( find == 0 ) {
        printf("-1");
    }
    return 0;
}